package com.wfc.service.serviceImpl;

import com.wfc.dao.UserDao;
import com.wfc.dao.daoImpl.UserDaoImpl;
import com.wfc.entity.User;
import com.wfc.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {

    //实例化Dao接口
    private UserDao userDao = new UserDaoImpl();


//    @Override
//    public List<User> ServiceSelectAll() {
//        return userDao.getNewsList();
//    }


    @Override
    public User ServiceByUsername(String username) {
        return userDao.ServiceByUsername(username);
    }

    @Override
    public boolean ServiceSinsertNews(User user) {
        return userDao.add(user);
    }

    @Override
    public boolean updateUser(User user) {
        return userDao.updateUser(user);
    }
}
